<?
define('BASEPATH', true);
include('../inc/config.php');

$id = $db->EscapeString($_GET['url']);

$sql = $db->Query("SELECT id,site,cpc FROM `sites` WHERE `id`='".$id."'");
$sit = $db->FetchArray($sql);
if($sit['site'] != ""){
?>
<html>
<style type="text/css">
body {
	background-color: transparent;
	margin: 0;
	padding: 0 0 0 22px;
	text-align: center;
	}
</style>
<body>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script type="text/javascript">
function clickme(json){
	if (json.state == "on"){
		if (typeof parent.click_callback == 'function') setTimeout('parent.click_callback("<?=$sit['id']?>", "<?=$sit['cpc']?>")',1000);
	}
};
</script>
<g:plusone callback="clickme" href="<?=$sit['site']?>" size="medium"></g:plusone>
</body>
</html><?}?>